From: Ray Strode Date: Mon, 25 Mar 2013 14:42:21 +0000 (-0400) Subject: background: don't choke on huge slide show durations X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4393 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1dadcee5c9ff9d2b4bd0c02cf3b17771aadb8367;p=gnome-shell.git background: don't choke on huge slide show durations if a slideshow file has a really large duration we'll currently throw an exception. This bug is aggravated by the fact that some versions of gnome-desktop use UINT_MAX as a sentinel value to mean, "don't ever update slide". This commit treats durations that would overflow as infinitely long. https://bugzilla.gnome.org/show_bug.cgi?id=696157 --- diff --git a/js/ui/background.js b/js/ui/background.js index 262545222..8c2870c45 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -503,6 +503,10 @@ const Background = new Lang.Class({ let interval = Math.max(ANIMATION_MIN_WAKEUP_INTERVAL * 1000, timePerStep); + + if (interval > GLib.MAXUINT32) + return; + this._updateAnimationTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, interval, Lang.bind(this, function() {